unit UPictureName;

interface

uses TypInfo;

// b_ = Boden
// p_ = Person
// i_ = Icon/Kein Objekt
type
  TPictureName = (
     b_Gras,                              { 1 }
     p_Blue, p_Blue_Tod, p_Blue_immortal, p_Blue_small, { 2 }
     p_Red, p_Red_Tod, p_Red_immortal, p_Red_small,   { 2 }
     a_Gumba,                             { 3 }
     b_Block, i_Block_Used,               { 4 }
     a_Geist ,                            { 5 }
     b_Finish,                            { 6 }
     b_Spike,                             { 7 }
     b_Platform,                          { 8 }
     b_Aufzug,                            { 9 }
     b_Stern,                             { 10 }
     i_Herz,
     b_Jumper, i_Jumper_Down,             { 11 }
     b_Gravity,                           { 12 }
     b_Gravity_normal,                    { 13 }
     b_Spike_Down,                        { 14 }
     b_Spike_Left,                        { 15 }
     b_Spike_Right,                       { 16 }
     b_Gravity_low,                       { 17 }
     b_Minimize,                          { 18 }
     Null { Null muss zum Schluss stehen bleiben }
   );

function PictureNameToString(Name: TPictureName): string;
function StringToPictureName(Name: string): TPictureName;

implementation

function PictureNameToString(Name: TPictureName): string;
begin
  result := GetEnumName(TypeInfo(TPictureName), integer(Name));
end;

function StringToPictureName(Name: string): TPictureName;
begin
  result := TPictureName(GetEnumValue(TypeInfo(TPictureName), Name));
end;

end.
